package com.szrt.java.day20161229.demo05;


import org.junit.Test;

public class TankTest {

	@Test
	public void test() {
		Tank tk = new Tank();
		tk.setName("轻型坦克");
		tk.setPrice(1000);
		tk.setSpeed(100);
		tk.setWeight(10);
		System.out.println(tk);
	}
	
	@Test
	public void test01() {
		Tank tk2 = new Tank("重型坦克",5000,140,30);
		System.out.println(tk2);
	}
	
	@Test
	public void shootTest(){
		Tank tk3 =new Tank("重型坦克",5000,140,30);
		System.out.println(tk3);
		tk3.shoot("飞毛腿导弹", 4000);
	}
	
	@Test
	public void shootTest02(){
		Tank tk4 = new Tank("轻型坦克",1000,100,10);
		System.out.println(tk4);
		tk4.shoot("爱国者导弹", 4000);
	}

}
